import config from '@/config'
import {getLocalSetting} from '@/utils/themeUtil'
import I18n from '@/i18n'

const localSetting = getLocalSetting(true)
console.log(config);
console.log(localSetting);

export default {
  namespaced: true,
  state: {
    ...config,
    ...localSetting,
    lang: 'zh_CN'
  },
  mutations: {
    setTheme (state, theme) {
      console.log(theme);
      state.theme = theme
    },
    setLang (state, lang) {
      state.lang = lang
      I18n.locale = lang
    }
  }
}